<?php

/**
 * becas_aplicables actions.
 *
 * @package    auip
 * @subpackage becas_aplicables
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class becas_aplicablesActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {   
      //$this->datos = $request->getParameter('v');
        $this->becas = new sfDoctrinePager('Beca', 5);
        $this->becas->setQuery(Doctrine::getTable('Beca')->createQuery('b')->where('b.registro_activo <> 0')->addOrderBy('b.fecha_inicio DESC')/*->andWhere( 'b.fecha_inicio >= ?',date('Y-m-d H:i:s', time() + 86400 * sfConfig::get('app_active_days')) )*/ );
        $this->becas->setPage($request->getParameter('pagina', 1));
        $this->becas->init();
  }
  
  public function executeShow(sfWebRequest $request)
  {
    $this->beca = Doctrine_Core::getTable('Beca')->find(array($request->getParameter('id')));       
    $this->forward404Unless($this->beca);    
  }
  
}
